﻿using System;
using RpcHelper.Validate;
using RpcModularModel.Resource;

namespace Wedonek.RpcStore.Service.Model
{
        public class IdentityProwerVal
        {
                /// <summary>
                /// 系统类别
                /// </summary>
                [NullValidate("rpc.system.type.null")]
                [LenValidate("rpc.system.type.len", 5, 50)]
                [FormatValidate("rpc.system.type.error", ValidateFormat.字母点)]
                public string SystemType
                {
                        get;
                        set;
                }
                /// <summary>
                /// 资源类型
                /// </summary>
                [EnumValidate("rpc.resource.type.error", typeof(ResourceType))]
                public ResourceType ResourceType { get; set; }


                /// <summary>
                /// 对应的资源值
                /// </summary>
                [NullValidate("rpc.resource.value.error")]
                [LenValidate("rpc.resource.value.len", 1, 100)]
                public string Value { get; set; }
        }
        public class IdentityProwerList
        {
                /// <summary>
                /// 应用Id
                /// </summary>
                [NullValidate("rpc.identity.Id.null")]
                public Guid AppId
                {
                        get;
                        set;
                }

                /// <summary>
                /// 身份标识权限
                /// </summary>
                [NullValidate("rpc.identity.prower.null")]
                public IdentityProwerVal[] Values
                {
                        get;
                        set;
                }
        }
}
